<template>
  <pie-chart id="transferWeekReportStats" v-bind="$attrs" :title="title" :data-source="dataSource" />
</template>

<script>
import PieChart from '@neu/biz-core/components/Charts/PieChart'
import { todayStats } from '@neu/dcom-ui/api/transferWeekly'
export default {
  name: 'TransferWeekReportTodayStats',
  components: {
    PieChart
  },
  props: {
    title: {
      type: String,
      default: '移交周报统计'
    }
  },
  data() {
    return {
      dataSource: []
    }
  },
  created() {
    todayStats().then(response => {
      const data = response.data
      this.dataSource = Object.entries(data)
    })
  }
}
</script>
